<?php get_header(); ?>

<div class="tt-entry podcast">

<?php 


if (have_posts()): the_post();
 ?>
 
<h2><a href="<?php the_permalink()?>"><?php the_title();?></a></h2>
<?php if ('open' == $post->comment_status) : ?><a href="<?php comments_link() ?>" class="num-comments"><?php comments_number('No Comments', '1 Comment', '% Comments', '', ''); ?></a><?php endif; ?>

<div class="tt-date"><span class="day"><?php the_time('d'); ?></span><span class="mon"><?php the_time('M') ?></span></div> 



<?php
include(dirname(__FILE__).'/podcast-controls.php');
?>
<div class="tt-contents">
<?php the_content(); ?>

<div class="tt-meta">
Posted on <?php the_time('l, M jS Y') ?> at <?php the_time() ?> <br />
<div class="links">
    <?php if ('open' == $post->comment_status):?>
    <a href="<?php comments_link() ?>" class="comments"><?php comments_number('No Comments', '1 Comment', '% Comments', '', 'Comments off'); ?></a>
    <?php else:?>
    Comments off
    <?php endif ?>
    <a href="<?php the_permalink() ?>" class="permalink" title="Permanent link to this post">Permalink</a>
    <?php if ('open' == $post->ping_status): ?>
    <a href="<?php trackback_url(display); ?>" class="trackback" title="Trackback URL">Leave a trackback</a> 
    <?php endif;?>
    <a href="feed/" class="comments-rss" title="RSS feed for comments">Comments RSS</a>
</div>
</div>


<div id="tt-older-posts">
<div style="margin:20px 0;">
<h4>Subscribe</h4>
<p>
<img src="/wp-content/themes/tantan/images/podcastsubscribe.jpg" style="float:right;" />
Subscribe to the <strong>Tan Tan Music Podcast</strong> 
and get 100% legal full length MP3 tracks delivered to your iPod. 
Just copy and paste the link below into iTunes or your podcast application.
</p>
<div style="text-align:center;margin:0 0 10px 0;">
<a href="http://feeds.feedburner.com/TanTanMusic" title="Subscribe to the Music Podcast" class="feed-large">Tan Tan Noodles Music Podcast</a><br />
<small>http://feeds.feedburner.com/TanTanMusic</small>
<br />
<a href="pcast://feeds.feedburner.com/TanTanMusic" class="itunes-feed">Click to Subscribe via iTunes</a>

</div>
<p>
Tan Tan Noodles does not host any MP3s. All music featured here is hosted and 
made available from each artist's actual web site (or authorized distributor's web site).
</p>
</div>

<h4 style="clear:both;">More Music</h4>
<ul>
<?php 
while (have_posts()) : the_post(); 
$enclosure = get_post_meta($post->ID, 'enclosure', true);
    $infoClass = '';
    $infoHTML = '';
    if ($enclosure) {
        $mp3 = split("\n", $enclosure);
        if (!$mp3[2] || ($mp3[2] && ereg('audio',$mp3[2]))) {
            $infoHTML = '- Audio MP3, '.round($mp3[1] / 1048576, 1).' MB';
            $infoClass = 'audio';
        }
    }
?>
<li><strong><a href="<?php the_permalink()?>"><?php the_title(); ?></a></strong>
<small><?php echo $infoHTML ?></small>
</li>

<?php endwhile; ?>
</ul>

<?php posts_nav_link(' ','Back','Show me more links &gt;'); ?>

<p>&nbsp;</p>
<p>
<a href="http://feeds.feedburner.com/TanTanMusic" title="Subscribe to the Music Podcast" class="feed">Subscribe to the Tan Tan Noodles Music Podcast</a>
</p>
</div>

</div>

<?php endif; ?>


</div>
<div id="tt-comments"></div>
<?php get_footer(); ?>
